package com.xjy.web.controller.system;

import com.xjy.common.core.domain.AjaxResult;
import com.xjy.system.domain.SysUserRole;
import com.xjy.system.service.ISysUserRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户和角色关联Controller
 *
 * @author xjy
 * @date 2022-02-19
 */
@Api(value = "用户和角色关联控制器", tags = {"用户和角色关联管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/system/role")
public class SysUserRoleController {
@Autowired
private ISysUserRoleService iSysUserRoleService;
	/**
	 * 获取用户和角色关联详细信息
	 */
	@ApiOperation("获取用户和角色关联详细信息")
	@GetMapping("/userId")
	public AjaxResult<SysUserRole> getInfo(Long userId) {
		return AjaxResult.success(iSysUserRoleService.queryById(userId));
	}
}
